﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace CNDM
{
    public partial class list : System.Web.UI.Page
    {
        private string cat_displayurl = "";
        public string Cat_ID = "-1";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["cat_displayurl"] != null && Request.QueryString["cat_displayurl"].ToString() != "")
            {
                cat_displayurl = Request.QueryString["cat_displayurl"].ToString();
            }

            if (!IsPostBack)
            {
                BindData();
            }
        }

        private void BindData()
        {
            DataTable dt = new DataTable();
            dt = BO.Category.CategoryData.Get_Category_by_CatUrl(cat_displayurl);
            if (dt != null && dt.Rows.Count > 0)
            {
                Cat_ID = dt.Rows[0]["Cat_ID"].ToString();
            }
        }
    }
}